package com.example.springbootdemo2.service.impl;

import com.example.springbootdemo2.pojo.db1.User;
import com.example.springbootdemo2.mapper.db1.UserMapper;
import com.example.springbootdemo2.service.UserService;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> selectUserList() {
        return userMapper.selectUserList();
    }

    @Override
    public User getUserById(int id) {
        return userMapper.getUserById(id);
    }

    @Override
    public Page<User> getUserList() {
        return userMapper.getUserList();
    }

    @Override
    public int adduser(User user) {
        return userMapper.addUser(user);
    }
}
